from curl_cffi import requests

proxies = {
    'http': 'http://127.0.0.1:7890',
    'https': 'http://127.0.0.1:7890'
}
headers = {
    "Host": "search.myzaker.com",
    "sec-ch-ua": "\"Not)A;Brand\";v=\"8\", \"Chromium\";v=\"138\", \"Android WebView\";v=\"138\"",
    "sec-ch-ua-mobile": "?1",
    "sec-ch-ua-platform": "\"Android\"",
    "Upgrade-Insecure-Requests": "1",
    "User-Agent": "Mozilla/5.0 (Linux; Android 13; 23013RK75C Build/TKQ1.220905.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/138.0.7204.179 Mobile Safari/537.36 ZAKER/9.1.5",
    "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
    "appinfo": "zaker 9.1.5 androidphone",
    "X-Requested-With": "com.myzaker.ZAKER_Phone",
    "Sec-Fetch-Site": "none",
    "Sec-Fetch-Mode": "navigate",
    "Sec-Fetch-User": "?1",
    "Sec-Fetch-Dest": "document",
    "Accept-Language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7"
}
url = "https://search.myzaker.com/api/"
params = {
    "_webcode": "6a4f6b762408eaaba189",
    "_flag": "fabd5a4b3c51b63fac7a19ebe65c7fab",
    "_os": "13_23013RK75C",
    "sign_arg": "search|_appid,_udid,_uid,_version,keyword",
    "app_ids": "660,310000,13,9,4,11542,5,7,3,8,10530,14,11581,14733",
    "_os_name": "23013RK75C",
    "_mcode": "23138B12",
    "_only_read": "N",
    "_clicode": "drkjeSEfcYDX1teOXihrCj2XzcFRNfVX8%2BYz4c8F97ou09PFuxwXRz5MiGDDPUNGhem0wpj6%2FrZjDz2db1S7FvanFsXVXzuSqDN0%2F9H5fXQboq5tdRLZNTtTWglt14Ow2up6UUUAOroimS1HlUPRnt%2FCQ4I%2BuQaYbMO3tBgfzppDreyPYJ3gJetESX4Iz9g%2F",
    "appType": "normal",
    "_v": "9.1.5",
    "_udid": "0d19bdc7155fc27e",
    "_appid": "AndroidPhone",
    "_dev": "39",
    "keyword": "特朗普",
    "full_arg": "_udid",
    "_version": "9.08",
    "_time": "1754448432",
    "_brand": "Redmi"
}
response = requests.get(url, headers=headers, params=params,proxies=proxies)

print(response.text)
print(response)
with open("search1.html", "w", encoding="utf-8") as f:
    f.write(response.text)